package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;
import org.jsola.core.validator.Const;
import org.jsola.hr.constant.TransferAccountsPayStatusEnum;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import static org.jsola.hr.example.TransferAccountsBatchExample.*;

/**
 * 转账批次
 *
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "新增【转账批次】的参数")
@Data
public class TransferAccountsBatchAddDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_CREATE_USER_NAME, example = E_CREATE_USER_NAME)
    @Length(max = 50, message = M_CREATE_USER_NAME_MAX)
    private String createUserName;

    @ApiModelProperty(notes = N_USER_APPRO_ID, example = E_USER_APPRO_ID)
    @Length(max = 32, message = M_USER_APPRO_ID_MAX)
    private String userApproId;

    @ApiModelProperty(notes = N_COMPANY_ID, example = E_COMPANY_ID)
    @Length(max = 32, message = M_COMPANY_ID_MAX)
    private String companyId;

    @ApiModelProperty(notes = N_COMPANY_NAME, example = E_COMPANY_NAME)
    @Length(max = 50, message = M_COMPANY_NAME_MAX)
    private String companyName;

    @ApiModelProperty(notes = N_SUBJECT_ID, example = E_SUBJECT_ID)
    @Length(max = 32, message = M_SUBJECT_ID_MAX)
    private String subjectId;

    @ApiModelProperty(notes = N_TYPE, example = E_TYPE)
    @NotNull(message = "到账方式不能为空")
    private Integer type;

    @ApiModelProperty(notes = N_SECOND_TYPE, example = E_SECOND_TYPE)
    private Integer secondType;

    @ApiModelProperty(notes = N_THIRDPARTY_BATCH_ID, example = E_THIRDPARTY_BATCH_ID)
    @Length(max = 100, message = M_THIRDPARTY_BATCH_ID_MAX)
    private String thirdpartyBatchId;

    @ApiModelProperty(notes = N_THIRD_PARTY_INTERIOR_BATCH_ID, example = E_THIRD_PARTY_INTERIOR_BATCH_ID)
    @Length(max = 200, message = M_THIRD_PARTY_INTERIOR_BATCH_ID_MAX)
    private String thirdPartyInteriorBatchId;

    @ApiModelProperty(notes = N_ORDER_TITLE, example = E_ORDER_TITLE)
    @Length(max = 64, message = M_ORDER_TITLE_MAX)
    @NotNull(message = "批次名称不能为空")
    private String orderTitle;

    @ApiModelProperty(notes = N_MONEY, example = E_MONEY)
    private BigDecimal money;

    @ApiModelProperty(notes = N_TOTAL_COUNT, example = E_TOTAL_COUNT)
    private Integer totalCount;

    @ApiModelProperty(notes = N_SUCCESS_COUNT, example = E_SUCCESS_COUNT)
    private Integer successCount;

    @ApiModelProperty(notes = N_SUCCESS_MONEY, example = E_SUCCESS_MONEY)
    private BigDecimal successMoney;

    @ApiModelProperty(notes = N_FAIL_COUNT, example = E_FAIL_COUNT)
    private Integer failCount;

    @ApiModelProperty(notes = N_FAIL_MONEY, example = E_FAIL_MONEY)
    private BigDecimal failMoney;

    @ApiModelProperty(notes = N_TIME_EXPIRE, example = E_TIME_EXPIRE)
    private Date timeExpire;

    @ApiModelProperty(notes = N_REMARK, example = E_REMARK)
    @Length(max = 256, message = M_REMARK_MAX)
    private String remark;

    @ApiModelProperty(notes = N_SUBJECT_STATUS, example = E_SUBJECT_STATUS)
    private Integer subjectStatus;

    @ApiModelProperty(notes = N_PAY_STATUS, example = E_PAY_STATUS, allowableValues = TransferAccountsPayStatusEnum.VALUES_STR)
    @Const(constClass = TransferAccountsPayStatusEnum.class, message = M_PAY_STATUS_ENUM_NOT_MATCH)
    private Integer payStatus;

    @ApiModelProperty(notes = N_ISSUE_USER_ID, example = E_ISSUE_USER_ID)
    @Length(max = 32, message = M_ISSUE_USER_ID_MAX)
    private String issueUserId;

    @ApiModelProperty(notes = N_ISSUE_USER_NAME, example = E_ISSUE_USER_NAME)
    @Length(max = 20, message = M_ISSUE_USER_NAME_MAX)
    private String issueUserName;

    @ApiModelProperty(notes = N_ISSUE_CREATE, example = E_ISSUE_CREATE)
    private Date issueCreate;

    @ApiModelProperty(notes = N_ISSUE_ACCOUNT_NAME, example = E_ISSUE_ACCOUNT_NAME)
    @Length(max = 100, message = M_ISSUE_ACCOUNT_NAME_MAX)
    private String issueAccountName;

    @ApiModelProperty(notes = N_PAY_TYPE, example = E_PAY_TYPE)
    private Integer payType;

    @ApiModelProperty(notes = N_TRANSFER_CREATE, example = E_TRANSFER_CREATE)
    private Date transferCreate;

    @ApiModelProperty(notes = N_FAIL_CAUSE, example = E_FAIL_CAUSE)
    @Length(max = 200, message = M_FAIL_CAUSE_MAX)
    private String failCause;

    @ApiModelProperty(notes = N_IS_DISPOSE, example = E_IS_DISPOSE)
    private Boolean isDispose;

    @ApiModelProperty(notes = "批次明细信息")
    private List<TransferAccountsDetailAddDTO> transferAccountsDetailAddDTOList;


}

